//
//  CJSSectionHeadView.m
//  GoTraveling
//
//  Created by 陈金山 on 15/12/25.
//  Copyright © 2015年 开发华佗. All rights reserved.
//

#import "CJSSectionHeadView.h"

@interface CJSSectionHeadView ()

@property (nonatomic, retain) UILabel *nameLabel;

@property (nonatomic, retain) UIImageView *lineImage;

@property (nonatomic, retain) UIImageView *imageView;

@end

@implementation CJSSectionHeadView


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor colorWithRed:0.98 green:0.97 blue:0.93 alpha:1];
        [self createSubViews];
    }
    return self;
}

- (void)createSubViews {
    
    self.lineImage = [[UIImageView alloc] initWithFrame:CGRectMake(-5, 0, SCREEN_WIDTH, 40)];
    self.lineImage.image = [UIImage imageNamed:@"waypoint_cell_shadow"];
    [self addSubview:self.lineImage];
    
    self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(50, 0, SCREEN_WIDTH - 70, 40)];
    self.imageView.image = [UIImage imageNamed:@"route_action_bar_bg"];
    [self addSubview:self.imageView];
    
    self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(50, 0, SCREEN_WIDTH - 120, self.imageView.frame.size.height)];
    self.nameLabel.text = @"都是为啊";
    self.nameLabel.textAlignment = NSTextAlignmentCenter;
    self.nameLabel.textColor = [UIColor whiteColor];
    self.nameLabel.font = [UIFont systemFontOfSize:18 weight:0.2];
    [self addSubview:self.nameLabel];
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
